<html>
<head><meta charset="utf-8"><title>Canonical env problems · wg-traits · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/index.html">wg-traits</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Canonical.20env.20problems.html">Canonical env problems</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="224425292"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Canonical%20env%20problems/near/224425292" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Canonical.20env.20problems.html#224425292">(Jan 29 2021 at 02:51)</a>:</h4>
<p><span class="user-mention silent" data-user-id="116009">nikomatsakis</span> <a href="#narrow/stream/144729-wg-traits/topic/meeting.202021-01-26/near/224105557">said</a>:</p>
<blockquote>
<p>maybe we should separate out the "from env" part</p>
</blockquote>
<p>Well, of course this ends up being more difficult than expected. For chalk-engine, this is fine because we instantiate the goal right after getting the program clauses currently. But for chalk-recursive, we instantiate the goal as we iterate through the clauses</p>



<a name="224425372"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Canonical%20env%20problems/near/224425372" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Canonical.20env.20problems.html#224425372">(Jan 29 2021 at 02:53)</a>:</h4>
<p>I think this is fine to move around though, just need to remove the <code>solve_via_implication</code> function (or just pass in inference table, subst, and instantiated goal, but the function is small so that seems more complicated)</p>



<a name="224507537"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Canonical%20env%20problems/near/224507537" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Canonical.20env.20problems.html#224507537">(Jan 29 2021 at 17:39)</a>:</h4>
<p><span aria-label="upside down" class="emoji emoji-1f643" role="img" title="upside down">:upside_down:</span> and this doesn't even work</p>



<a name="224509949"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Canonical%20env%20problems/near/224509949" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Canonical.20env.20problems.html#224509949">(Jan 29 2021 at 17:56)</a>:</h4>
<p>Welp so <a href="https://github.com/rust-lang/chalk/blob/9332c49e1d3bfd66e54ce0754223a297b081ab95/chalk-solve/src/clauses.rs#L857">this</a> was an oversight by me</p>



<a name="224510000"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Canonical%20env%20problems/near/224510000" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Canonical.20env.20problems.html#224510000">(Jan 29 2021 at 17:56)</a>:</h4>
<p>Well...mistake...I wrote that</p>



<a name="224510067"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Canonical%20env%20problems/near/224510067" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Canonical.20env.20problems.html#224510067">(Jan 29 2021 at 17:57)</a>:</h4>
<p>This doesn't check if there are inference vars recursively</p>



<a name="224510113"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Canonical%20env%20problems/near/224510113" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Canonical.20env.20problems.html#224510113">(Jan 29 2021 at 17:57)</a>:</h4>
<p>(and definitely doesn't check for escaping bound vars)</p>



<a name="224510916"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Canonical%20env%20problems/near/224510916" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Canonical.20env.20problems.html#224510916">(Jan 29 2021 at 18:02)</a>:</h4>
<p><code>match_ty</code> is a mess atm</p>



<a name="224511052"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Canonical%20env%20problems/near/224511052" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Canonical.20env.20problems.html#224511052">(Jan 29 2021 at 18:03)</a>:</h4>
<p>Particularly that <code>Dyn</code> block</p>



<a name="224514779"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Canonical%20env%20problems/near/224514779" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Canonical.20env.20problems.html#224514779">(Jan 29 2021 at 18:31)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> see <a href="https://github.com/rust-lang/chalk/issues/676">chalk#676</a> and <a href="https://github.com/rust-lang/chalk/issues/671">chalk#671</a> (671 is rebased on 676)</p>



<a name="224514892"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Canonical%20env%20problems/near/224514892" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Canonical.20env.20problems.html#224514892">(Jan 29 2021 at 18:32)</a>:</h4>
<p>I applied your review of splitting <code>program_clauses_for_goal</code> into before/after instantiation</p>



<a name="224739053"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Canonical%20env%20problems/near/224739053" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Canonical.20env.20problems.html#224739053">(Feb 01 2021 at 15:10)</a>:</h4>
<p><span class="user-mention" data-user-id="232957">@Jack Huey</span> <span aria-label="point up" class="emoji emoji-1f446" role="img" title="point up">:point_up:</span> is this still relevant?</p>



<a name="224739062"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Canonical%20env%20problems/near/224739062" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Canonical.20env.20problems.html#224739062">(Feb 01 2021 at 15:10)</a>:</h4>
<p>I r+'d those, iirc</p>



<a name="224739074"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Canonical%20env%20problems/near/224739074" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Canonical.20env.20problems.html#224739074">(Feb 01 2021 at 15:10)</a>:</h4>
<p>Yes</p>



<a name="224739075"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Canonical%20env%20problems/near/224739075" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Canonical.20env.20problems.html#224739075">(Feb 01 2021 at 15:10)</a>:</h4>
<p>looks like they landed</p>



<a name="224739085"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Canonical%20env%20problems/near/224739085" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Canonical.20env.20problems.html#224739085">(Feb 01 2021 at 15:10)</a>:</h4>
<p>great</p>



<a name="224739098"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Canonical%20env%20problems/near/224739098" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Canonical.20env.20problems.html#224739098">(Feb 01 2021 at 15:11)</a>:</h4>
<p><span class="user-mention silent" data-user-id="232957">Jack Huey</span> <a href="#narrow/stream/144729-wg-traits/topic/Canonical.20env.20problems/near/224514892">said</a>:</p>
<blockquote>
<p>I applied your review of splitting <code>program_clauses_for_goal</code> into before/after instantiation</p>
</blockquote>
<p>I noticed :)</p>



<a name="224739099"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Canonical%20env%20problems/near/224739099" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Canonical.20env.20problems.html#224739099">(Feb 01 2021 at 15:11)</a>:</h4>
<p><a href="https://github.com/rust-lang/chalk/issues/680">chalk#680</a></p>



<a name="224739158"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Canonical%20env%20problems/near/224739158" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Canonical.20env.20problems.html#224739158">(Feb 01 2021 at 15:11)</a>:</h4>
<p>hmm, maybe we want a fixme?</p>



<a name="224739160"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Canonical%20env%20problems/near/224739160" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Canonical.20env.20problems.html#224739160">(Feb 01 2021 at 15:11)</a>:</h4>
<p>I guess it's not worth it</p>



<a name="224739166"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Canonical%20env%20problems/near/224739166" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Canonical.20env.20problems.html#224739166">(Feb 01 2021 at 15:11)</a>:</h4>
<p>we know we have to revisit constraints</p>



<a name="224739171"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Canonical%20env%20problems/near/224739171" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Canonical.20env.20problems.html#224739171">(Feb 01 2021 at 15:11)</a>:</h4>
<p>Long story short: don't know how the empty environment in constraints didn't end up in previous PR, but we talked about this as a good enough solution for now</p>



<a name="224739188"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Canonical%20env%20problems/near/224739188" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Canonical.20env.20problems.html#224739188">(Feb 01 2021 at 15:11)</a>:</h4>
<p>not sure that an issue will help us remember</p>



<a name="224739193"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Canonical%20env%20problems/near/224739193" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Canonical.20env.20problems.html#224739193">(Feb 01 2021 at 15:11)</a>:</h4>
<p>yes exactly</p>



<a name="224739205"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Canonical%20env%20problems/near/224739205" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Canonical.20env.20problems.html#224739205">(Feb 01 2021 at 15:11)</a>:</h4>
<p>ok!</p>



<a name="224739207"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Canonical%20env%20problems/near/224739207" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Canonical.20env.20problems.html#224739207">(Feb 01 2021 at 15:11)</a>:</h4>
<p>r+'d</p>



<a name="224739277"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Canonical%20env%20problems/near/224739277" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Canonical.20env.20problems.html#224739277">(Feb 01 2021 at 15:12)</a>:</h4>
<p>I'll file an issue for <code>Constraint</code>s rework and mention this</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>